package com.ruoyi.web.Service.Impl;

import com.ruoyi.web.Service.MenuService;
import com.ruoyi.web.domain.MenuInfo;
import com.ruoyi.web.mapper.MenuMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: my-ruoyi-master_202130504106_李航
 * @description:
 * @author: LiHang
 * @create: 2021-10-19 12:19
 **/

@Service
public class MenuServiceImpl implements MenuService {

    @Autowired
    MenuMapper menuMapper;

    /**
     * 查询菜单的数量
     * @return
     */
    @Override
    public int selectCountOfMenu() {
        int count = menuMapper.selectCountOfMenu();
        return count;
    }

    /**
     * 查询所有菜单信息
     *
     * @return
     */
    @Override
    public List<MenuInfo> selectMenu() {
        List<MenuInfo> menuInfos = menuMapper.selectMenu();
        return menuInfos;
    }
}
